import java.io.*;
public class fibonacci{
    public static void main (String[] args) throws IOException {
        if (args.length <1) throw new RuntimeException ("not enough arguments");
        if (args.length >1) throw new RuntimeException ("too many arguments");
        BufferedReader reader = new BufferedReader (new FileReader ( new File (args[0])));
        String line;
        while ((line = reader.readLine()) != null){
            System.out.println(getFN(Integer.parseInt(line)));
        }
    }
    
    public static int getFN (int n){
       int cur = 1;
       int prev = 1;
       int tmp = 0;
       int counter = 1;
       while(counter<n){
           tmp = cur;
           cur = cur + prev;
           prev = tmp;
           counter++;
       }
       return prev;
    }
}